<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Cliente: Referencia de la Clase TP::Servicios::FileServiceProxy</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Cliente
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generado por Doxygen 1.8.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Página&#160;principal</span></a></li>
      <li class="current"><a href="annotated.html"><span>Clases</span></a></li>
      <li><a href="files.html"><span>Archivos</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Buscar" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Lista&#160;de&#160;clases</span></a></li>
      <li><a href="classes.html"><span>Índice&#160;de&#160;clases</span></a></li>
      <li><a href="hierarchy.html"><span>Jerarquía&#160;de&#160;la&#160;clase</span></a></li>
      <li><a href="functions.html"><span>Miembros&#160;de&#160;las&#160;clases</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Todo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Clases</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Funciones</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>TP</b></li><li class="navelem"><b>Servicios</b></li><li class="navelem"><a class="el" href="classTP_1_1Servicios_1_1FileServiceProxy.html">FileServiceProxy</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Métodos públicos</a>  </div>
  <div class="headertitle">
<div class="title">Referencia de la Clase TP::Servicios::FileServiceProxy</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="client__FileServiceProxy_8h_source.html">client_FileServiceProxy.h</a>&gt;</code></p>

<p><a href="classTP_1_1Servicios_1_1FileServiceProxy-members.html">Lista de todos los miembros.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Métodos públicos</h2></td></tr>
<tr class="memitem:af655504efd3262f8d1982d150e582de6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af655504efd3262f8d1982d150e582de6"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>FileServiceProxy</b> (const string &amp;pUsuario, <a class="el" href="classTP_1_1Comunicacion_1_1SocketAsincronico.html">SocketAsincronico</a> *pSocket)</td></tr>
<tr class="memitem:a8af2c6dfa9535ceff518d3f232ecace1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTP_1_1Servicios_1_1FileServiceProxy.html#a8af2c6dfa9535ceff518d3f232ecace1">DeclareFile</a> (const uint32_t &amp;pToken, const std::string &amp;fileName, const uint32_t &amp;pVersion)</td></tr>
<tr class="memdesc:a8af2c6dfa9535ceff518d3f232ecace1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Declara un archivo nuevo.  <a href="#a8af2c6dfa9535ceff518d3f232ecace1"></a><br/></td></tr>
<tr class="memitem:af1d830e271158114a06d9c717419b1e8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTP_1_1Servicios_1_1FileServiceProxy.html#af1d830e271158114a06d9c717419b1e8">DeleteFile</a> (const uint32_t &amp;pToken, const std::string &amp;fileName, const uint32_t &amp;pVersion)</td></tr>
<tr class="memdesc:af1d830e271158114a06d9c717419b1e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solicita borrar un archivo.  <a href="#af1d830e271158114a06d9c717419b1e8"></a><br/></td></tr>
<tr class="memitem:ab0ea6ee6afc9bfc0b799cf571c9c8a4e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTP_1_1Servicios_1_1FileServiceProxy.html#ab0ea6ee6afc9bfc0b799cf571c9c8a4e">GetFileChunk</a> (const uint32_t &amp;pToken, const string &amp;pFileName, const uint32_t &amp;pChunkNumber)</td></tr>
<tr class="memdesc:ab0ea6ee6afc9bfc0b799cf571c9c8a4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtiene del archivo pFileName alojado en el sevidor el chunk indicado.  <a href="#ab0ea6ee6afc9bfc0b799cf571c9c8a4e"></a><br/></td></tr>
<tr class="memitem:a4b72d1be8de1dba584dc5b75e8aa241e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTP_1_1Servicios_1_1FileServiceProxy.html#a4b72d1be8de1dba584dc5b75e8aa241e">PutFileChunk</a> (const uint32_t &amp;pToken, const std::string &amp;fileName, const uint32_t &amp;pChunkNumber, const string &amp;pHash, const uint8_t *pChunk, const size_t pChunkSize)</td></tr>
<tr class="memdesc:a4b72d1be8de1dba584dc5b75e8aa241e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Agrega al final del archivo fileName el bloque de bytes chunk.  <a href="#a4b72d1be8de1dba584dc5b75e8aa241e"></a><br/></td></tr>
<tr class="memitem:ab4dd52329a91c0c0411bdf5bb9124189"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTP_1_1Servicios_1_1FileServiceProxy.html#ab4dd52329a91c0c0411bdf5bb9124189">DefineFile</a> (const uint32_t &amp;pToken, std::string &amp;fileName)</td></tr>
<tr class="memdesc:ab4dd52329a91c0c0411bdf5bb9124189"><td class="mdescLeft">&#160;</td><td class="mdescRight">Termina de definir el archivo.  <a href="#ab4dd52329a91c0c0411bdf5bb9124189"></a><br/></td></tr>
<tr class="memitem:ad58200d101c7723ab8c87a0b29b6421b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTP_1_1Servicios_1_1FileServiceProxy.html#ad58200d101c7723ab8c87a0b29b6421b">GetRepositorio</a> (const uint32_t &amp;pToken)</td></tr>
<tr class="memdesc:ad58200d101c7723ab8c87a0b29b6421b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Solicita la ultima version del repositorio.  <a href="#ad58200d101c7723ab8c87a0b29b6421b"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Descripción detallada</h2>
<div class="textblock"><p>Clase que genera los mensajes a enviar al servidor de acuerdo a la accion que corresponda. </p>
</div><hr/><h2>Documentación de las funciones miembro</h2>
<a class="anchor" id="a8af2c6dfa9535ceff518d3f232ecace1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FileServiceProxy::DeclareFile </td>
          <td>(</td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pToken</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pVersion</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Declara un archivo nuevo. </p>
<dl class="params"><dt>Parámetros:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pToken</td><td></td></tr>
    <tr><td class="paramname">fileName</td><td>nombre del archivo a declarar </td></tr>
    <tr><td class="paramname">pVersion</td><td>version del archivo respecto al repositorio </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab4dd52329a91c0c0411bdf5bb9124189"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool FileServiceProxy::DefineFile </td>
          <td>(</td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pToken</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Termina de definir el archivo. </p>
<dl class="params"><dt>Parámetros:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pToken</td><td></td></tr>
    <tr><td class="paramname">fileName</td><td>nombre del archivo </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Devuelve:</dt><dd>true si hubo exito, false si no </dd></dl>

</div>
</div>
<a class="anchor" id="af1d830e271158114a06d9c717419b1e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FileServiceProxy::DeleteFile </td>
          <td>(</td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pToken</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pVersion</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Solicita borrar un archivo. </p>
<dl class="params"><dt>Parámetros:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pToken</td><td></td></tr>
    <tr><td class="paramname">fileName</td><td>nombre del archivo a declarar </td></tr>
    <tr><td class="paramname">pVersion</td><td>version del archivo respecto al repositorio </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab0ea6ee6afc9bfc0b799cf571c9c8a4e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool FileServiceProxy::GetFileChunk </td>
          <td>(</td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pToken</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>pFileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pChunkNumber</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Obtiene del archivo pFileName alojado en el sevidor el chunk indicado. </p>
<dl class="params"><dt>Parámetros:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pToken</td><td></td></tr>
    <tr><td class="paramname">fileName</td><td>nombre del archivo a declarar </td></tr>
    <tr><td class="paramname">pChunkNumber</td><td>indice de chunk </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Devuelve:</dt><dd>true si hubo exito, false si no </dd></dl>

</div>
</div>
<a class="anchor" id="ad58200d101c7723ab8c87a0b29b6421b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FileServiceProxy::GetRepositorio </td>
          <td>(</td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pToken</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Solicita la ultima version del repositorio. </p>
<dl class="params"><dt>Parámetros:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pToken</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4b72d1be8de1dba584dc5b75e8aa241e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool FileServiceProxy::PutFileChunk </td>
          <td>(</td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pToken</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32_t &amp;&#160;</td>
          <td class="paramname"><em>pChunkNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>pHash</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>pChunk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>pChunkSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Agrega al final del archivo fileName el bloque de bytes chunk. </p>
<dl class="params"><dt>Parámetros:</dt><dd>
  <table class="params">
    <tr><td class="paramname">pToken</td><td></td></tr>
    <tr><td class="paramname">fileName</td><td>nombre del archivo a declarar </td></tr>
    <tr><td class="paramname">pChunkNumber</td><td>indice de chunk </td></tr>
    <tr><td class="paramname">pHash</td><td>hash MD5 del chunk </td></tr>
    <tr><td class="paramname">pChunk</td><td>bloque a insertar </td></tr>
    <tr><td class="paramname">pChunkSize</td><td>tamaño del bloque </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Devuelve:</dt><dd>true si hubo exito, false si no </dd></dl>

</div>
</div>
<hr/>La documentación para esta clase fue generada a partir de los siguientes ficheros:<ul>
<li><a class="el" href="client__FileServiceProxy_8h_source.html">client_FileServiceProxy.h</a></li>
<li>client_FileServiceProxy.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generado por &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1
</small></address>
</body>
</html>
